package com.zzty.txj1.dao;


import com.zzty.txj1.entity.Search;
import com.zzty.txj1.entity.TeamExam;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TeamExamDao {
    @Select("select * from teamExam")
    List<TeamExam> getAllTeamExam();
    @Insert("insert into teamExam (questionId,classId,date) values (#{questionId},#{classId},#{date})")
    Integer addTeamExam(TeamExam teamExam);
    @Select("select * from teamExam where classId=#{clazzId} and date between #{bDate} and #{eDate}")
     List<TeamExam> getTeamExam(Search search);

    @Select("select * from teamExam where classId=#{classId} and date=#{date}")
    TeamExam checkByDateAndClazzId(TeamExam teamExam);


    @Select("select * from teamExam where classId=#{classId} and date=#{date}")
    TeamExam checkHomework(TeamExam teamExam);

    @Select("select * from teamExam where classId=#{classId}")
    List<TeamExam> getSelfExamByClazzId(TeamExam teamExam);


}
